
<!-- saved from url=(0044)http://demo.demohuo.top/modals/59/5920/demo/ -->
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>网站后台管理系统</title>

    <meta name="viewport" content="width=device-width, initial-scale=1">


    <!--可无视-->
    <link rel="stylesheet" href="__STATIC__/web/js/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="__STATIC__/layui/css/layui.css"/>
    <link rel="stylesheet" href="__PUBLIC__/css/login.css"/>
    <!--主要样式-->

    <script>
        if(self!=top)
        {
            parent.location.href='index.html';
        }
        function CheckLogin(obj){
            if(obj.username.value=='')
            {
                alert('请输入用户名');
                obj.username.focus();
                return false;
            }
            if(obj.password.value=='')
            {
                alert('请输入登录密码');
                obj.password.focus();
                return false;
            }
            return true;
        }
    </script>

    <style>
        body{
            background: url(__PUBLIC__/banner.jpg);
            background-attachment: fixed;
            background-repeat: no-repeat;
            background-position: center;
            background-size: 100%;
        }
        blockquote, q {
            quotes: none;
        }
        blockquote:before, blockquote:after, q:before, q:after {
            content: '';
            content: none;
        }
        table {
            border-collapse: collapse;
            border-spacing: 0;
        }
        /* start editing from here */
        a {
            text-decoration: none;
        }
        img {
            max-width: 100%;
        }
        /*end reset*/
        /****-----start-body----****/
        body {
            background-color: #0091e6;
        }
        h1 {
            font-size: 2.4em;
            padding-bottom: 28px;
            color: #fff;
            text-align: center;
        }
        h2 {
            font-size: 1.5em;
            padding-bottom: 28px;
            color: #0091e6;
            text-align: center;
        }
        .login {
            padding: 2em 0;
        }
        .inset {
            position: relative;
            background: #fff;
            padding: 2.5em;
            border-radius: 0.3em;
            -webkit-border-radius: 0.3em;
            -o-border-radius: 0.3em;
            -moz-border-radius: 0.3em;
            box-shadow: 0px 0px 15px #545454;
        }
        form span {
            display: block;
            font-size: 1.0em;
            color: #333;
            font-weight: 400;
        }
        input[type="text"], input[type="password"] , select{
            padding: 9px;
            width: 93.4%;
            font-size: 1.1em;
            margin: 3px 0px 25px;
            color: #666666;
            background: #f0f0f0;
            border: none;
            font-weight:400;
            outline: none;
            -webkit-transition: all 0.3s ease-out;
            -moz-transition: all 0.3s ease-out;
            -ms-transition: all 0.3s ease-out;
            -o-transition: all 0.3s ease-out;
            transition: all 0.3s ease-out;
            border-radius: 0.2em;
            -webkit-border-radius: 0.2em;
            -o-border-radius: 0.2em;
            -moz-border-radius: 0.2em;
        }
        input[type="text"]:hover, input[type="Password"]:hover, #active {
            border: none;
            outline: none;
        }
        .sign {
            padding: 10px 0 0;
            text-align: center;
        }
        .submit {
            margin-right:11px;
            background:#0091e6;
            border: none;
            outline: none;
            padding:8px 30px;
            cursor: pointer;
            color: #FFF;
            font-size: 0.9em;
            border-radius: .3em;
            -webkit-border-radius: .3em;
            -moz-border-radius: .3em;
            -o-border-radius: .3em;
            transition: 0.5s all;
            -webkit-transition: 0.5s all;
            -moz-transition: 0.5s all;
            -o-transition: 0.5s all;
            font-weight: 600;
            margin: 0 auto;
        }
        .submit:hover {
            background: #C5C5C5;
        }
        .rzm{ position:relative}
        .rzm img{ position: absolute;top:0px;right:0px; height:45px;}

        /*----start-responsive design-----*/
        h1 {
            font-size: 2.2em;
        }
        }
        @media (max-width:991px) {
            h1 {
                font-size: 2em;
            }
        }

        h1 {
            font-size: 2.1em;
        }
        }
        .inset {
            padding: 2em;
        }
        h1 {
            font-size: 1.9em;
        }
        .login {
            padding: 2em 0 0;
        }
        }
    </style>
</head>
<body>

<div class="container" align="center">
    <div class="col-md-6" style="margin-top: 20%;">
        <div class="inset">
            <form class="layui-form" action="" method="post">
                <h2>后台管理系统</h2>
                <div class="layui-form-item">
                    <input type="text" name="username" value="" lay-verify="required" lay-verType="Tips" placeholder="请输入用户名"
                           autocomplete="on" class="layui-input">
                </div>
                <div class="layui-form-item">
                    <input type="password" name="password" value="" lay-verify="required" lay-verType="Tips" placeholder="请输入密码"
                           autocomplete="on" class="layui-input">
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-inline">
                        <input type="text" name="captcha" value="" lay-verify="required" lay-verType="Tips" placeholder="请输入验证码"
                               autocomplete="off" class="layui-input">
                    </div>
                    <div style="float: right; margin-right: 0px;">
                        <img src="{:captcha_src()}" id="captcha" onclick="this.src='{:captcha_src()}?seed='+Math.random()" height="38" width="150"
                             alt="captcha"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <button class="layui-btn" lay-submit lay-filter="login">登录</button>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    if(document.login.equestion.value==0)
    {
        showanswer.style.display='none';
    }


</script>

<script type="text/javascript" src="__STATIC__/layui/layui.js"></script>
<script type="text/javascript">
    layui.use(['form', 'layer', 'jquery'], function () {
        var form = layui.form,
            layer = layui.layer;
        var $ = layui.jquery;

        var href = "{:url('tdadmin/index/index')}";

        form.on('submit(login)', function (data) {
            $.post("{:url('tdadmin/public/doLogin')}", data.field, function (res) {
                if (res.code == 1) { //验证通过，跳转到refer指定的地址
                    layer.msg(res.msg, {icon: 6}, function () {
                        window.location.href = href;
                    });
                } else {
                    layer.msg(res.msg, {icon: 5}, function () {
                        $('#captcha').attr('src', "{:captcha_src()}");
                        return false;
                    });
                }
            });
            return false;
        });
    });
</script>


</body></html>